{% extends "base.html" %}

{% block title %}Editor{% endblock %}

{% block subtitle %}Edit{% endblock %}

{% block content %}
    {% if type == "truck" %}
        <form method="POST" action="/edit_vehicle/{{ num }}">
            <label>Truck № </label>
            <input type="text" id="num" name="num" value="{{num}}" disabled><br><br>
            <label for="year_made_t">Year:</label>
            <input type="text" id="year_made_t" name="year_made" value="{{ vehicle_to_edit.year }}"required><br><br>
            <label for="model_t">Model:</label>
            <input type="text" id="model_t" name="model" value="{{ vehicle_to_edit.model }}" required><br><br>
            <label for="capacity">Capacity:</label>
            <input type="text" id="capacity" name="capacity" value="{{ vehicle_to_edit.capacity }}" required><br><br>
            <input type="submit" value="submit">
        </form>
    {% endif %}
    {% if type == "car" %}
        <form method="POST" action="/edit_vehicle/{{ num }}">
            <label>Car № </label>
            <input type="text" id="num_c" name="num" value="{{num}}"disabled><br><br>
            <label for="year_made_c">Year:</label>
            <input type="text" id="year_made_c" name="year_made" value="{{ vehicle_to_edit.year }}" required><br><br>
            <label for="model_c">Model:</label>
            <input type="text" id="model_c" name="model" value="{{ vehicle_to_edit.model }}" required><br><br>
            <input type="submit" value="submit">
        </form>
    {% endif %}

{% endblock %}